<?php
   include "Connecting to a Database.php";

   if(isset($_POST['user'])){
    $user = $_POST['user'];//获取前端传入的值，并且存入变量。
    $resule = $conn->query("select * from registry_login where tel='$user'");//查询
    if($resule->fetch_assoc()){
        $arr_info1=Array('status'=>1,'meg'=>"手机号登录");

    }
    else{
        // $conn->query("INSERT INTO registry_login(`sid`, `username`, `tel`, `password`) VALUES (null,null,'$user',null)");
        $arr_info1=Array('status'=>0,'meg'=>"手机号未注册");
    }
  }
  echo json_encode($arr_info1);
//   header('location:http://localhost/my-wangyi/frontend/registry.html');
?>